
import { ModalForm, ProFormDigit, ProFormText } from '@ant-design/pro-components';
import { Form } from 'antd';

export default function AutoClickImageButtonDialog({children, onFinish, initialValue}) {
  const [form] = Form.useForm();
  return (
    <ModalForm
      title="新建表单"
      trigger={children}
      form={form}
      autoFocusFirstInput
      modalProps={{
        destroyOnClose: true,
      }}
      submitTimeout={2000}
      onFinish={values => {
        onFinish(values)
        return true
      }}
    >
      <ProFormText
        name="btn_image"
        label="按钮识别名"
        initialValue={initialValue?.btn_image || ""}
      />
      <ProFormDigit
        name="interval"
        label="间隔"
        initialValue={initialValue?.interval || 1}
      />
      
      
    </ModalForm>
  )
}